package com.wwwarehouse.taskcenter.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

/**
 * @创建者 chenchao.
 * @创建时间 2017/10/20 11:54
 * @描述 ${TODO}
 */

public class PreviewWareCodeBean implements Parcelable {


    /**
     * list : [{"datacode":"111","floor":"111","latic":"123","line":"111","row":"111"}]
     * total : 123
     */

    private int total;
    private List<ListBean> list;

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    public List<ListBean> getList() {
        return list;
    }

    public void setList(List<ListBean> list) {
        this.list = list;
    }

    public static class ListBean implements Parcelable {
        /**
         * datacode : 111
         * floor : 111
         * latic : 123
         * line : 111
         * row : 111
         */

        private String datacode;
        private String floor;
        private String lattic;
        private String line;
        private String row;

        public String getDatacode() {
            return datacode;
        }

        public void setDatacode(String datacode) {
            this.datacode = datacode;
        }

        public String getFloor() {
            return floor;
        }

        public void setFloor(String floor) {
            this.floor = floor;
        }

        public String getLattic() {
            return lattic;
        }

        public void setLattic(String lattic) {
            this.lattic = lattic;
        }

        public String getLine() {
            return line;
        }

        public void setLine(String line) {
            this.line = line;
        }

        public String getRow() {
            return row;
        }

        public void setRow(String row) {
            this.row = row;
        }

        public ListBean() {
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.datacode);
            dest.writeString(this.floor);
            dest.writeString(this.lattic);
            dest.writeString(this.line);
            dest.writeString(this.row);
        }

        protected ListBean(Parcel in) {
            this.datacode = in.readString();
            this.floor = in.readString();
            this.lattic = in.readString();
            this.line = in.readString();
            this.row = in.readString();
        }

        public static final Creator<ListBean> CREATOR = new Creator<ListBean>() {
            @Override
            public ListBean createFromParcel(Parcel source) {
                return new ListBean(source);
            }

            @Override
            public ListBean[] newArray(int size) {
                return new ListBean[size];
            }
        };
    }


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.total);
        dest.writeTypedList(this.list);
    }

    public PreviewWareCodeBean() {
    }

    protected PreviewWareCodeBean(Parcel in) {
        this.total = in.readInt();
        this.list = in.createTypedArrayList(ListBean.CREATOR);
    }

    public static final Parcelable.Creator<PreviewWareCodeBean> CREATOR = new Parcelable.Creator<PreviewWareCodeBean>() {
        @Override
        public PreviewWareCodeBean createFromParcel(Parcel source) {
            return new PreviewWareCodeBean(source);
        }

        @Override
        public PreviewWareCodeBean[] newArray(int size) {
            return new PreviewWareCodeBean[size];
        }
    };
}
